//
//  HomeChoiceView.m
//  ZiJinLian
//
//  Created by 震霄 张 on 2018/3/12.
//  Copyright © 2018年 lzy. All rights reserved.
//

#import "HomeChoiceView.h"

@interface HomeChoiceView()

@property (weak, nonatomic) IBOutlet UIView *lineView;
@property (weak, nonatomic) IBOutlet UIButton *showBtn;

@end

@implementation HomeChoiceView

+(instancetype)homechoiceView
{
	return [[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:nil options:nil].lastObject;
}
-(void)awakeFromNib
{
	[super awakeFromNib];
	self.autoresizingMask = UIViewAutoresizingNone;

}

- (IBAction)bgBtnCLick:(id)sender {
	NSMutableDictionary *dic = [NSMutableDictionary dictionary];
	[dic setValue:@"3" forKey:@"type"];
	[dic setValue:[NSString stringWithFormat:@"%ld",self.model.cateId] forKey:@"value"];
	[[NSNotificationCenter defaultCenter]postNotificationName:@"jumpOther" object:nil userInfo:dic];
}

-(void)setModel:(HomeSonClassModel *)model
{
	_model = model;
	[self.showBtn setTitle:model.cateName forState:UIControlStateNormal];
	
}
-(void)setLastOne:(BOOL)LastOne
{
	_LastOne = LastOne;
	self.lineView.hidden = LastOne;
}

@end
